from spider.client import start_spider
from utils import common_logger

logger = common_logger.get_logger('start-spider', 'spider.start.log')

while True:
    try:
        start_spider()
    except Exception as exc:
        import time
        import os
        import platform

        if platform.system() != 'Windows':
            os.system("kill $(ps -ef|grep chrom |grep -v grep|awk '{print $2}')")
        time.sleep(10)
        logger.error('run halt')

